/**
 * @author: 團長
 * @date: 2014-2-11-下午4:01:13
 */
package net.loyintean.pearlshell.task.bus;

import net.loyintean.pearlshell.base.model.IResult;


/**
 * Concurrent task destributer.
 * <p>
 * This service destributes current tasks which provides by ITaskFactory to
 * ITaskExecuteService, and runs some process before and after the tasks. Then,
 * returns the result of tasks by IResult.
 * <p>
 * 2014-2-20 Loy: remove the throws of {@link #destributeTask(Object...)} v1.1.0
 * 
 * @author 團長
 * @since 2014-2-20
 * @version 1.1.0
 */
public interface ITaskDestributeService<T> {

	/**
	 * Destributes the tasks to executor.
	 * <p>
	 * The tasks is provided by ITaskFactory. The executor is specifies by
	 * ITaskExecuteService.
	 * <p>
	 * There are some before/after proecess for execute.
	 * <p>
	 * 2014-2-20 Loy: remove the throws.
	 * 
	 * @author 團長
	 * @since 2014-2-17
	 * @param taskDatas
	 *            datas for tasks.
	 * @return the result of tasks.
	 */
	public IResult<T> destributeTask(Object... taskDatas);

}
